<template>
	<view class="index-page"></view>
</template>

<script setup>
	import { onLoad } from '@dcloudio/uni-app'
	import { ref } from 'vue'
	import { useConfigStore } from '@/common/stores'
	const configStore = useConfigStore()
	onLoad(() => {
		//#ifdef APP-PLUS
		if (configStore.firstInstall.isAgree) {
			if (uni.$auth.isLogin()) {
				uni.reLaunch({
					url: '/pages/home/home'
				})
			} else {
				uni.reLaunch({
					url: '/pages/login/login'
				})
			}
		} else {
			uni.reLaunch({
				url: '/pages/index/first-install/first-install'
			})
		}
		// #endif
		//#ifndef APP-PLUS
		if (uni.$auth.isLogin()) {
			uni.reLaunch({
				url: '/pages/home/home'
			})
		} else {
			uni.reLaunch({
				url: '/pages/login/login'
			})
		}
		// #endif

	})
</script>

<style scoped>
.index-page{
	min-height: 100vh;
	background-color: #ffffff;
}
</style>